package application;

import java.awt.Component;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;


public class Tetris extends Component {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public static void main(String[] args){
		Tetris t = new Tetris();
		
		t.addKeyListener(new KeyListener(){
		
		
	
			public void keyPressed(KeyEvent e){
				if(e.getKeyCode() == KeyEvent.VK_LEFT){
					System.out.println("gauche");
				}
				if(e.getKeyCode() == KeyEvent.VK_RIGHT){
					System.out.println("droite");
				}
				if(e.getKeyCode() == KeyEvent.VK_DOWN){
					System.out.println("bas");
				}
				if(e.getKeyCode() == KeyEvent.VK_UP){
					System.out.println("haut");
				}
			}

			@Override
			public void keyReleased(KeyEvent e) {
				// TODO Auto-generated method stub
				
			}

			@Override
			public void keyTyped(KeyEvent e) {
				// TODO Auto-generated method stub
				
			}
			
		});	
	
	}}
